<?php
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($GLOBALS['PAD']."Modules/FJK46JDE/modconf.php"); 
MYTCONN();
	form_pr('tmck_offs','','','post'); 
	//=======================================================
	// Gest Users
?>
<div id="OffAction"></div>
<div class="title"><b>Consulta de alteraÇ&otilde;es</b></div>

<table width="100%"  border="0" cellpadding="1" cellspacing="4" bgcolor="#F2F2F2">
  <tr>
    <td>Lojas</td>
    <td>Grupo</td>
    <td>Tipo</td>
    <td>Estado</td>
    <td>No Periodo</td>
	<td></td>
  </tr>
  <tr>
    <td bgcolor="#F2F2F2"><?php 
	
		
		 $Qur = "SELECT ref AS ID, name AS NAME FROM systemoffice.main_offices";
		 mn_field('select','ED','SYSOffices','',$Qur,' ','False','');
		 ?></td>
    <td width="12%"><?php 
	
		
		 $Qur = "SELECT sug_ID AS ID, sug_Name AS NAME FROM systemoffice.sys_usergroups";
		 mn_field('select','ED','SYSUserGroups','',$Qur,' ','False','');
		 ?></td>
    <td width="12%"><?php 
		 $Qur = "SELECT PID AS ID, PDESCRIPTION AS NAME FROM systemoffice.sys_process WHERE FLAG = 1";
		 mn_field('select','ED','tsv_Process','',$Qur,' ','False','');
		 ?></td>
    <td width="25%"><?php
	$qrFlag = "Aprovado;Cancelado#1;2";
	mn_field('hselect','ED','tsv_Flag','',$qrFlag,'','',''); ?></td>
	<td NOWRAP>De <?php
	mn_field('date','ED','tsv_DateStart','','tmck_offs','8','','');
	echo ' a: ';
	mn_field('date','ED','tsv_DateEnd','','tmck_offs','8','','');
	?></td>
    <td width="50%">
    	<?php 
		 mn_field('button','ED','SYSUser_Search','Consultar','','','False','SUBMIT "
		 	onClick="
				document.tmck_offs.action=\''.$MODURL.'lib/get_offs.php\';
				subform(\'tmck_offs\',\'UserList\');');?></td>
  </tr>
</table>
</form>
<div id="UserList"></div>